<?php
namespace app\index\controller;
use think\Controller;

class Index extends Controller
{
    public function index()
    {
    	return $this->fetch();
    }

	public function is_upload(){
    	if($this->request->isPost()){
			$files = $this->request->file('file');//tp 封装的函数  相当于 PHP的  $_FILE ;
			foreach ($files as $file)
			{
				$info = $files->move(ROOT_PATH . 'public' . DS . 'upload');//就是原生的 move_uploaded_file() 而已
			}
			return '上传成功了';
		}
		return $this->fetch();
	}

}
